#ifndef GDN_SFML_UTILITY_H
#define GDN_SFML_UTILITY_H

#include <SFML/Graphics.hpp>

#include "gdn/Vector2.h"
#include "gdn/Color.h"
#include "gdn/Rectangle.h"
#include "gdn/Event.h"
#include "gdn/Key.h"

namespace gdn
{
	template< typename T >
	sf::Vector2< T > ConvertFromGdn( const Vector2< T >& v2 )
	{
		return sf::Vector2< T >( v2.x, v2.y );
	}

	template< typename T >
	Vector2< T > ConvertToGdn( const sf::Vector2< T >& v2 )
	{
		Vector2< T > toReturn;
		toReturn.x = v2.x;
		toReturn.y = v2.y;
		return toReturn;
	}

	sf::Color ConvertFromGdn( const Color& col );

	Color ConvertToGdn( const sf::Color& col );

	template< typename T >
	sf::Rect< T > ConvertFromGdn( const Rectangle< T >& rect )
	{
		return sf::Rect< T >( rect.x, rect.y, rect.width, rect.height );
	}

	template< typename T >
	Rectangle< T > ConvertToGdn( const sf::Rect< T >& rect )
	{
		Rectangle< T > toReturn;
		toReturn.x = rect.Left;
		toReturn.y = rect.Top;
		toReturn.width = rect.Width;
		toReturn.height = rect.Height;
		return toReturn;
	}

	Event ConvertToGdn( const sf::Event& event );

	Key::Code ConvertToGdn( const sf::Key::Code& key );

	Mouse::Button ConvertToGdn( const sf::Mouse::Button& button );

	//sf::Event ConvertFromGdn( const Event& event ); // Too lazy to do this. :P

	char ConvertToGdn( const sf::Uint32& character );
}

#endif // GDN_SFML_UTILITY_H
